import ddddocr


# 初始化识别器
ocr = ddddocr.DdddOcr()
# 识别验证码图片
with open('static/验证码/1234.jpg', 'rb') as f:
    image = f.read()
# 进行识别
result = ocr.classification(image)
print(f"识别结果: {result}")